package com.sky.mapper;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.time.LocalDateTime;
import java.util.Map;

@Mapper
public interface WorkspaceMapper {

    @Select("select count(*) from dish where status = 1")
    Integer qi();

    @Select("select count(*) from dish where status = 0")
    Integer ting();

    @Select("select count(*) from setmeal where status = 1")
    Integer qic();

    @Select("select count(*) from setmeal where status = 0")
    Integer tingc();

    @Select("select count(*) from orders where status = #{status}")
    Integer countByMap(Map map);

    @Select("select sum(amount) from orders where status = #{status}")
    Double sumByMap(Map map);

    @Select("select count(*) from orders ")
    Integer sum(Map map);


}
